﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace ConsoleVigenereMeter
{
    class Helper
    {
        public static String ToString(ArrayList array)
        {
            int length = array.Count;
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < length; ++i)
            {
                sb.Append("" + (i + 1) + " " + array[i] + "\n");
            }

            return sb.ToString();
        }

        public static ArrayList CalculateDivisor(int number)
        {
            ArrayList divisor = new ArrayList();
            int div = (number / 2) + 1;
            for (int i = 1; i < div; ++i)
            {
                if (number % i == 0)
                {
                    divisor.Add(i);
                }
            }

            return divisor;
        }
    }
}
